<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

class Test_controller extends CI_Controller {

    public function __construct() {
        parent::__construct();
    }

    function index() {
    echo strlen("khalid");
    }

    function meta() {
        $this->template->set('scripts', 'sdsdsdsd');

        $this->load->view('projects/embded');
    }

    function upload() {

        $config['upload_path'] = RESOURCES_PATH;
        $config['allowed_types'] = 'zip|rar';
        $config['overwrite'] = true;

        $project_name = 'Test_project';
        $this->load->library('upload', $config);
        $file_name = "myfile";

        if (!$this->upload->do_upload($file_name)) {

            echo $this->upload->display_errors();
        } else {
            echo json_encode($this->upload->data());
        }
    }

}
